//
//  YDRechargeTableHeaderView.m
//  PeiZiWangBei
//
//  Created by LK-IOS on 2017/11/14.
//  Copyright © 2017年 LK-IOS. All rights reserved.
//

#import "YDRechargeTableHeaderView.h"

@interface YDRechargeTableHeaderView()
//标题
@property (nonatomic , weak) UILabel *titleLabel;
@end



@implementation YDRechargeTableHeaderView


+ (instancetype)headerViewWithTableView:(UITableView *)tableView
{
    
    static NSString *rechargeTableHeaderView = @"YDRechargeTableHeaderView";
    YDRechargeTableHeaderView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:rechargeTableHeaderView];
    if (headerView == nil) {
        headerView = [[YDRechargeTableHeaderView alloc] initWithReuseIdentifier:rechargeTableHeaderView];
    }
    return headerView;
}


-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.contentView.backgroundColor = [UIColor clearColor];

        [self titleLabel];
        
    }
    return self;
}

-(UILabel *)titleLabel
{
    if (_titleLabel == nil) {
        UILabel *titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:titleLabel];//blueyGrey
        titleLabel.font = [UIFont systemFontOfSize:font12ScreenWRate * LKScreenW];
        titleLabel.textColor = [UIColor colorWithHexString:blueyGrey];
        titleLabel.textAlignment = NSTextAlignmentLeft;
        titleLabel.text = @"我的银行卡";
        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.equalTo(self).offset(rate375(20));
        }];
        _titleLabel = titleLabel;
    }
    return _titleLabel;
}




@end
